package com.railway.dao;

import java.util.Date;
import java.util.List;

import com.railway.bean.Expenditures;
import com.railway.bean.Integra;
import com.railway.bean.IntegraDetailed;
import com.railway.bean.Revenue;

/**
 * @author 33676
 *用于积分表，积分支出详细，积分收入详细的数据库操作
 */
public interface IntegraDao {
	
	/**
	 * @param integral_id
	 * @return
	 * 查询积分
	 */
	Integra selectIntegra(int user_id);
	
	/**查询积分详细
	 * @param integra_id
	 * @return
	 */
	List<IntegraDetailed> selectIntegraDetaileds(int integra_id);
	
	/**查询不同时间的积分详细
	 * @param integra_id
	 * @return
	 */
	List<IntegraDetailed> selectIntegraDetailedsByTime(int integra_id,String give_or_take,String Startingtime,String Endtime);
	
	/**查询积分收入详细
	 * @param integra_id
	 * @param PageNum
	 * @param PageSize
	 * @param oldTime1
	 * @param oldTime2
	 * @return
	 */
	List<Revenue> selectRevenue(int integra_id,int PageNum,int PageSize,String oldTime1,String oldTime2);
	
	
	/**查询积分支出
	 * @param integra_id
	 * @param PageNum
	 * @param PageSize
	 * @param oldTime1
	 * @param oldTime2
	 * @return
	 */
	List<Expenditures> selectExpenditures(int integra_id,int PageNum,int PageSize,String oldTime1,String oldTime2);
	
	/**用于积分的修改
	 * @param users_id
	 * @param mark
	 * @return
	 */
	int updateIntegra(int integra_id,int countImtegral,int Number_of_credits_aboutTo_expire);
	
	/**用于积分的添加
	 * @param user_id
	 * @return
	 */
	int insertIntegra(int user_id);
}
